home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* Semaphore control -- Initialize *)
- (* *)
- (* Copyright 1990 by H. Roy Engehausen. All rights reserved. *)
- (* This software may be freely distributed and used, but it may not *)
- (* under any circumstances be sold by anyone other than the author. *)
- (* It may be distributed by a commercial company as long as it is *)
- (* for no cost. *)
- (* *)
- (*===========================================================================*)
-
- (*===========================================================================*)
- (* Semaphore initialization *)
- (*===========================================================================*)
-
- PROCEDURE sema_clear_all;
-
- VAR
- init_i : BYTE;
-
- BEGIN;
-
- FOR init_i := 1 TO semaphore_max DO
- WITH sem_info_array[init_i] DO
- BEGIN;
- process_list := NIL;
- sem_status := sem_clear;
- excl_count := 0;
- time_out := time_out_short;
- last_unlock := NIL;
- END;
- END;
-